<include file="common:head" />
<div class="wash_company_logo">
	<div class="img">
		<empty name="list.address_img">
			<img src="__PRIVATE__/Images/time.png"/>
		<else />
			<img src="{$list.address_img}" />
		</empty>
	</div>
	<div class="company_name">{$list.address_name}</div>
</div>

	<div class="server_type" onclick="javascript:goconfirm();">
		<div class="img once fl">
			<img src="__PRIVATE__/Images/once.png"/>
		</div>
		<div class="fl price">單次消費</div>
		<div class="fl right"><img src="__PRIVATE__/Images/right.png"/></div>
	</div>
	<div class="cl"></div>

	<div class="server_type" onclick="javascript:goMonthCard({$have_monthcard});">
		<div class="img month fl">
			<img src="__PRIVATE__/Images/month.png"/>
		</div>
		<div class="fl price">購買月卡</div>
		<div class="fl right"><img src="__PRIVATE__/Images/right.png"/></div>
	</div>
	<div class="cl"></div>

<script type="text/javascript">
$('.header .title').html('{$list.address_name}');
$('.header .left').html('<img src="__PRIVATE__/images/left.png" style="width:55%"/>');
$('.header .right').html('');
$('.header .left').click(function(){
	window.location.href = "{:U(MODULE_NAME.'/index/wash_shop_list')}";
});

//跳轉confirm頁面--【单次卡】
function goconfirm(){
	window.location.href = "{:U(MODULE_NAME.'/index/once_card_list',array('id'=>$list['id']))}";
}

//跳轉到購買月卡服務頁面 --【购买月卡】
function goMonthCard(flag){
	if (flag) {
		window.location.href = "{:U(MODULE_NAME.'/index/month_card_list',array('id'=>$list['id']))}";
	}else{
		layer.open({
		    content: '您的月卡未用完'
		    ,skin: 'msg'
		    ,style: 'width: 40%; height:5%;padding:20px;font-size:3rem;'
		    ,time: 2 //2秒后自动关闭
		});
	}
}
</script>
